package com.wenmingliang.demo1;

import java.util.LinkedList;
import java.util.Scanner;
public class Main2{
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        LinkedList<Integer> linkedList = new LinkedList<>();
        for (int i = 0; i < n; i++) {
            linkedList.add(input.nextInt());
        }
        int min = input.nextInt();
        int max = input.nextInt();
        for (int i = 0; i < linkedList.size(); i++) {
            while (linkedList.get(i)>=min && linkedList.get(i)<=max)
                linkedList.remove(i);//这里不能用if，一定要用while，不然输出有误，亲测！！
        }
        for (int i = 0; i < linkedList.size()-1; i++){
            System.out.print(linkedList.get(i)+" ");
        }
        System.out.print(linkedList.getLast());
    }
}
